import myaxios from '@/http/MyAxios'

export interface MenuItem {
    key: string
    title: string
    children?: MenuItem[]
    icon?: string
    path?: string
}

export interface MenuResponse {
    code: number
    message: string
    data: MenuItem[]
}

/**
 * 获取菜单列表
 */
export function getMenuList(): Promise<MenuResponse> {
    return myaxios({
        url: '/api/Menu/GetMenuList',
        method: 'get'
    }).then(res => res.data)
}

